package com.bistu.xiong.factory.model.api.tuling;

import com.bistu.xiong.common.Common;
import com.bistu.xiong.factory.model.api.account.BaseModel;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by XiongXiaoJun on 2017/12/25.
 */

public class TuLingSendModel implements BaseModel{
    private String key;
    private String info;
    private String userid;

    public TuLingSendModel(String info, String userid) {
        //默认key
        key = Common.Constance.API_KEY;
        this.info = info;
        this.userid = userid;
    }

    public TuLingSendModel(String key, String info, String userid) {
        //初始化自定义key
        this.key = key;
        this.info = info;
        this.userid = userid;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    @Override
    public Map<String, String> getMap() {
        Map<String, String> map = new HashMap<>();
        if (key!=null&&(!key.equals(""))){
            map.put(key,"key");
        }else{
            key = Common.Constance.API_KEY;
            map.put(key,"key");
        }
        if (info!=null){
            map.put(info,"info");
        }
        if (userid!=null){
            map.put(userid,"userid");
        }
        return map;
    }
}
